package com.yuke.cloud.service.uac.dao;

import com.yuke.cloud.common.core.mybatis.MyMapper;
import com.yuke.cloud.service.uac.entity.AccMenu;
import com.yuke.cloud.service.uac.entity.AccPermission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AccPermissionMapper extends MyMapper<AccPermission> {

    List<AccPermission> getOwnPermissionListByUserId(Long userId);

    /**
     * Delete by menu id int.
     *
     * @param id the id
     *
     * @return the int
     */
    int deleteByMenuId(@Param("menuId") Long id);

    /**
     * Query Permission list with page list.
     *
     * @param accPermission the acc permission
     *
     * @return the list
     */
    List<AccPermission> queryPermissionListWithPage(AccPermission accPermission);

    /**
     * Batch delete by id list int.
     *
     * @param deleteIdList the delete id list
     *
     * @return the int
     */
    int batchDeleteByIdList(@Param("idList") List<Long> deleteIdList);

    /**
     * List action list list.
     *
     * @param menuList the menu list
     *
     * @return the list
     */
    List<AccPermission> listPermissionListByMenus(@Param("menuList") List<AccMenu> menuList);

}